home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / gl101.zip / GLLIBR.CH < prev    next >
Text File  |  1991-06-27  |  78KB  |  2,121 lines

  1. *.............................................................................
  2. *
  3. *   Program Name: GLLIBR.CH        Created By: Global Technologies Corporation
  4. *   Date Created: 06/05/90           Language: Clipper 5.0
  5. *   Time Created: 11:27:44             Author: Bill French                               
  6. *
  7. *   The Graphics Language - Copyright (c) 1990,1991 - Bits Per Second Ltd.
  8. *            In Association With Global Technologies Corporation
  9. *
  10. *.............................................................................
  11. #define     Void                    NIL          // function return default
  12. #define     PointsPerLine           41.666       // points per line in the dGE screen
  13. #define     PointsPerColumn         17.088       // points per column in the dGE screen
  14. #define     IconShadowOffsetD       .2           // down shift offset for icon shadowing
  15. #define     IconShadowOffsetR       .5           // right shift offset for icon shadowing
  16.  
  17. #define     PieLabelOffSet          3            // default pie chart label offset (chrs)
  18. #define     PieChartRadius          8            // default chart radius (rows)
  19. #define     BarChartWidth           60           // default bar chart width (chrs)
  20. #define     BarChartHeight          20           // default bar chart height (rows)
  21. #define     BarXLabels              0            // set the x labels to horizontal(1=vertical)
  22.  
  23. #define     MaxScreens              20           // maximum number of screen handles
  24. #define     MaxHandles              70           // maximum number of object handles
  25. #define     NullString              ""
  26. #define     NullInteger             00
  27.  
  28. #define     NoSuchLabel             01           // error number for label not found
  29. #define     NoHandlesLeft           02           // error number for no unused handles left
  30. #define     NoMemoryLeft            03           // error number for no video memory left 
  31. #define     NoMouseDriver           04           // error number for no mouse driver
  32. #define     NoSuchHandle            05           // error number for no handle
  33. #define     NoLabelsLeft            06           // error number for no more labels
  34.  
  35. #define     ShadowOn                .T.          // various preprocessor assignments
  36. #define     ShadowOff               .F.
  37. #define     FlashOn                 .T.
  38. #define     FlashOff                .F.
  39. #define     InactiveObject          .F.
  40. #define     ActiveObject            .T.
  41.  
  42. #define     IconButtonObject        01           // various object numbers
  43. #define     TextButtonObject        02
  44. #define     EventRegionObject       03
  45. #define     BoxButtonObject         04
  46.  
  47. #define     UpperLeftBevelColor     "w+/"
  48. #define     LowerRightBevelColor    "n+/"
  49. #define     BevelSurfaceColor       "b/"
  50. #define     BevelFrameColor         "w+/"
  51.  
  52. #define     TRUE                    .T.          // various std constants
  53. #define     FALSE                   .F.
  54.  
  55.  
  56. // SET GRAPHICS --------------------------------------------------------------
  57. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  58. // 
  59. // Description:
  60. // This command switches the screen mode from text to graphics via the dGE
  61. // high resolution function.  This command must be executed before any other
  62. // graphics commands are encountered.  Once you leave the graphics mode via
  63. // the command SET GRAPHICS OFF, you must re-establish the environment once
  64. // again.  The button GET array and the screen will be erased.  See the 
  65. // Technical Reference section for more details about the button GET list 
  66. // array.
  67. // 
  68. // Syntax:
  69. // SET GRAPHICS [ON] [OFF]
  70. //
  71. // Arguments:
  72. // <ON> change to graphical mode.
  73. // <OFF> change to text mode.
  74. //    
  75. // Example:
  76. // SET GRAPHICS ON                           // switch from text to graphics
  77. //    
  78. //          Purpose: Initialize and establish graphics mode
  79. //  Mapped Function: __SetGraphics() contained in GLLIBR.PRG.
  80. //    dGE functions: sethires(),settext()
  81. //    Other GL UDFs: None.
  82. // System variables: _handles_[],_eshadow_,_icnfile_,_dgepath_,_icnwidt_
  83. //                   _icnheig_
  84. // System constants: MaxHandles
  85. //
  86. // See Also:
  87. // 
  88. #command    SET GRAPHICS ;                       // Completed 12-24-90
  89.                   [<gon: ON>] ;
  90.                   [OFF] ;
  91.                => __SetGraphics(<.gon.>)
  92.  
  93.  
  94. // SET VIDEO TO --------------------------------------------------------------
  95. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  96. // 
  97. // Description:
  98. // This command selects the desired graphics mode and operates slightly
  99. // different when using the memory-resident drivers.  It only supports 
  100. // EGA and VGA.
  101. // 
  102. // Syntax:
  103. // SET VIDEO TO [EGA] [VGA]
  104. //
  105. // Arguments:
  106. // <video> is the graphics video mode, either EGA or VGA.  The graphics
  107. //   language does not support any other video modes.
  108. //
  109. // Example:
  110. // SET VIDEO TO VGA                          // establish vga support mode
  111. //    
  112. //          Purpose: Change the default video mode
  113. //  Mapped Function: __SetVideo() contained in GLLIBR.PRG.
  114. //    dGE functions: setvideo()
  115. //    Other GL UDFs: None.
  116. // System variables: None.
  117. // System constants: None.
  118. //
  119. // See Also:
  120. // 
  121. #command    SET VIDEO TO ;                       // Completed 12-24-90
  122.                   <video> ;
  123.                => __SetVideo(<"video">)
  124.  
  125.  
  126. // SET DGE RESOURCES TO ------------------------------------------------------
  127. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  128. // 
  129. // Description:
  130. // This command enables your applications to find dGE supporting files such
  131. // as character sets, icon files, and super font files in directories other
  132. // than the current one.  The search hierarhy is based first on a specified
  133. // SET DGE RESOURCES command. If a RESOURCES command has not been issued, the 
  134. // search for resource files continues with a look at the DOS environment for
  135. // a DGE environment variable.  Lacking an environmnt variable, the current 
  136. // directory is assumed to be the location of all resource files.  Note that 
  137. // like other Grahics Language commands, SET DGE RESOURCES must be used after 
  138. // SET GRAPHICS ON has been issued.
  139. // 
  140. // Syntax:
  141. // SET DGE RESOURCES TO <reourcepath>
  142. //
  143. // Arguments:
  144. // <resourcepath> must include a valid path and optionally preceeded by a 
  145. //   disk drive letter.  Complex expressions are supported.
  146. //    
  147. // Example:
  148. // SET DGE RESOURCES TO C:\DGE               // establish resources path
  149. //    
  150. //          Purpose: Set the path to dGE resources
  151. //  Mapped Function: __SetResources() contained in GLLIBR.PRG.
  152. //    dGE functions: None.
  153. //    Other GL UDFs: None.
  154. // System variables: _dgepath_
  155. // System constants: None.
  156. //
  157. // See Also:
  158. // 
  159. #command    SET DGE RESOURCES TO ;               // Completed 12-24-90
  160.                   <resourcepath> ;
  161.                => __SetResources(<"resourcepath">)
  162.  
  163.  
  164. // SET PALETTE BACKGROUND ----------------------------------------------------
  165. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  166. // 
  167. // Description:
  168. // This command allows you to change the background color of the graphics 
  169. // screen in dGE.  The color is specified in normal Clipper syntax.
  170. // 
  171. // Syntax:
  172. // SET PALETTE BACKGROUND TO [BRIGHT] <color>
  173. //
  174. // Arguments:
  175. // <BRIGHT> will set the specified color to a bright status.
  176. // <color> is a standard Clipper color code.
  177. //    
  178. // Example:
  179. // SET PALETTE BACKGROUND TO BRIGHT BLUE  // establish bright blue bkgrnd
  180. //    
  181. //          Purpose: Set the graphics background color
  182. //  Mapped Function: __SetPalette() contained in GLLIBR.PRG.
  183. //    dGE functions: setpal()
  184. //    Other GL UDFs: __WordToColor()
  185. // System variables: None.
  186. // System constants: None.
  187. //
  188. // See Also:
  189. // 
  190. #command    SET PALETTE BACKGROUND TO ;          // Completed 12-24-90
  191.                   [[<bri: BRIGHT>] <color>] ;
  192.                => __SetPalette(<"color">,if(<.bri.>,"BRIGHT ",""))
  193.  
  194. // CLEAR GRAPHICS SCREEN -----------------------------------------------------
  195. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  196. // 
  197. // Description:
  198. // This command clears the screen while in graphics mode.  It performs 
  199. // the same function in graphics mode as CLEAR SCREEN does in text mode.                  
  200. //
  201. // Syntax:
  202. // CLEAR GRAPHICS SCREEN
  203. //
  204. // Arguments:
  205. // None.
  206. //    
  207. // Example:
  208. // CLEAR GRAPHICS SCREEN                     // clear the graphics screen
  209. //    
  210. //          Purpose: Clear the graphics screen
  211. //  Mapped Function: __ClearGScreen() contained in GLLIBR.PRG.
  212. //    dGE functions: clrscreen()
  213. //    Other GL UDFs: None.
  214. // System variables: None.
  215. // System constants: None.
  216. //
  217. // See Also:
  218. // 
  219. #command    CLEAR GRAPHICS SCREEN ;              // Completed 12-24-90
  220.                => __ClearGScreen()
  221.  
  222.  
  223. // CLEAR GRAPHICS WINDOW -----------------------------------------------------
  224. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  225. // 
  226. // Description:
  227. // This command clears a specific area of the screen.
  228. // 
  229. // Syntax:
  230. // CLEAR GRAPHICS WINDOW FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>
  231. //
  232. // Arguments:
  233. // <Pos1_a> is the upper left row screen coordinate from 0 to 24.
  234. // <Pos1_b> is the upper left column screen coordinate from 0 to 79.
  235. // <Pos2_a> is the lower right row screen coordinate from 0 to 24.
  236. // <Pos2_b> is the lower right column screen coordinate from 0 to 79.
  237. // [BEVEL] will clear an area that contains a beveled box which has
  238. //   dimensions slightly larger than the originally specified frame.
  239. //    
  240. // Example:
  241. // CLEAR GRAPHICS WINDOW FROM 10,10 TO 20,20 // clear a 10 by 10 window   
  242. //    
  243. //          Purpose: Clear a window area
  244. //  Mapped Function: __ClearGWindow() contained in GLLIBR.PRG.
  245. //    dGE functions: clrwin()
  246. //    Other GL UDFs: __XDge(),__YDge()
  247. // System variables: None.
  248. // System constants: None.
  249. //
  250. // See Also:
  251. // 
  252. #command    CLEAR GRAPHICS WINDOW FROM ;         // Completed 12-24-90
  253.                   <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>;
  254.                   [<bev: BEVEL>] ;
  255.                => __ClearGWindow(<Pos1_a>,<Pos1_b>,<Pos2_a>,<Pos2_b>,<.bev.>)
  256.  
  257.  
  258. // RESET GRAPHICS ARRAY ------------------------------------------------------
  259. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  260. // 
  261. // Description:
  262. // This command resets the dGE internal graphingn in preparation for new data
  263. // to be charted.
  264. //
  265. // Syntax:
  266. // RESET GRAPHICS ARRAY
  267. //
  268. // Arguments:
  269. // None.
  270. //    
  271. // Example:
  272. // RESET GRAPHICS ARRAY
  273. //
  274. //          Purpose: Clear the dGE graphics array
  275. //  Mapped Function: __ResetGArray() contained in GLLIBR.PRG.
  276. //    dGE functions: datareset()
  277. //    Other GL UDFs: None.
  278. // System variables: None.
  279. // System constants: None.
  280. //
  281. // See Also:
  282. // 
  283. #command    RESET GRAPHICS ARRAY ;               // Complete 12-26-90
  284.                => __ResetGArray()
  285.  
  286.  
  287. // SCALE GRAPHICS ARRAY ------------------------------------------------------
  288. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  289. // 
  290. // Description:
  291. // This command adjusts the data currently stored in the dGE internal 
  292. // charting so that charts can be presented in a meaningful way.
  293. //
  294. // Syntax:
  295. // SCALE GRAPHICS ARRAY TO <percent> 
  296. //
  297. // Arguments:
  298. // <percent> is the percentage to scale the data stored in the internal dGE 
  299. // charting array.
  300. //    
  301. // Example:
  302. // SCALE GRAPHICS ARRAY TO 70
  303. //
  304. //          Purpose: Scale the dGE graphics array
  305. //  Mapped Function: __ScaleGArray() contained in GLLIBR.PRG.
  306. //    dGE functions: datapc()
  307. //    Other GL UDFs: None.
  308. // System variables: None.
  309. // System constants: None.
  310. //
  311. // See Also:
  312. // 
  313. #command    SCALE GRAPHICS ARRAY TO ;            // Complete 12-26-90
  314.                   <percent> ;
  315.                => __ScaleGArray(<percent>)
  316.  
  317.  
  318. // SET DRAWING AREA -----------------------------------------------------------
  319. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  320. // 
  321. // Description:
  322. // This command will establish a window that will prohibit any drawing to
  323. // occur outside.  It is a simple way to confine the display of graphical
  324. // objects.
  325. //
  326. // Syntax:
  327. // SET DRAWING AREA
  328. //    [FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>]
  329. //
  330. // Arguments:
  331. // <Pos1_a> is the upper left row screen coordinate of the box.
  332. // <Pos1_b> is the upper left column screen coordinate of the box.
  333. // <Pos2_a> is the lower right row screen coordinate of the box.
  334. // <Pos2_b> is the lower right column screen coordinate of the box.
  335. //
  336. // Example:
  337. // SET DRAWING AREA FROM <Pos1_a>,<Pos1_b> ; // define a drawing area
  338. //    TO <Pos2_a>,<Pos2_b>
  339. //    
  340. //          Purpose: Restrict drawing to a window area
  341. //  Mapped Function: __SetDrawArea() contained in GLLIBR.PRG.
  342. //    dGE functions: clipwin()
  343. //    Other GL UDFs: None.
  344. // System variables: None.
  345. // System constants: None.
  346. //
  347. // See Also:
  348. // 
  349. #command    SET DRAWING AREA ;                  // Completed 12-28-90
  350.                   [FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>];
  351.                => __SetDrawArea(<Pos1_a>,<Pos1_b>,<Pos2_a>,<Pos2_b>)
  352.  
  353.  
  354. // SAVE GRAPHICS SCREEN -------------------------------------------------------
  355. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  356. // 
  357. // Description:
  358. // This command will save a specific portion of the graphics screen in
  359. // similar fashion to Clipper's SAVE and RESTORE SCREEN commands.  There
  360. // are certain limitations to dGE's ability to save and restore screen
  361. // regions so read carefully about SNAPCOPY() before using this feature.
  362. // The maximum number of screen saves that are possible is limited by
  363. // default to 20, however, this can be changed by modifying the pre-
  364. // processor constant MaxScreens in this file.
  365. //
  366. // Syntax:
  367. // SAVE GRAPHICS SCREEN <label> FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>
  368. //
  369. // Arguments:
  370. // <label> is a name tag that identifies the screen for later recall.
  371. // <Pos1_a> is the upper left row screen coordinate of the box.
  372. // <Pos1_b> is the upper left column screen coordinate of the box.
  373. // <Pos2_a> is the lower right row screen coordinate of the box.
  374. // <Pos2_b> is the lower right column screen coordinate of the box.
  375. //
  376. // Example:
  377. // SAVE GRAPHICS SCREEN "scr_one" ;          // save screen ONE
  378. //    FROM <Pos1_a>,<Pos1_b> ;
  379. //    TO <Pos2_a>,<Pos2_b>
  380. //    
  381. //          Purpose: Save an area of the graphics screen
  382. //  Mapped Function: __SaveGScreen() contained in GLLIBR.PRG.
  383. //    dGE functions: snapcopy()
  384. //    Other GL UDFs: None.
  385. // System variables: _screens_[]
  386. // System constants: MaxScreens
  387. //
  388. // See Also:
  389. // RESTORE GRAPHICS SCREEN
  390. // 
  391. #command    SAVE GRAPHICS SCREEN <label> ;      // Completed 12-28-90
  392.                   FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>;
  393.                => __SaveGScreen(<label>,<Pos1_a>,<Pos1_b>,<Pos2_a>,<Pos2_b>)
  394.  
  395.  
  396. // RESTORE GRAPHICS SCREEN ----------------------------------------------------
  397. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  398. // 
  399. // Description:
  400. // This command restores previously saved areas of the graphics screen that
  401. // were captured with the SAVE GRAPHICS SCREEN command.  To restore an area,
  402. // you must specify the label that the area was originally saved under.
  403. //
  404. // Syntax:
  405. // RESTORE GRAPHICS SCREEN <label>
  406. //
  407. // Arguments:
  408. // <label> is a name tag that the screen was originally saved under.
  409. //
  410. // Example:
  411. // RESTORE GRAPHICS SCREEN "scr_one" ;       // restore screen "scr_one"
  412. //    
  413. //          Purpose: Restore a previously saved area of the graphics screen
  414. //  Mapped Function: __RestGScreen() contained in GLLIBR.PRG.
  415. //    dGE functions: snappaste()
  416. //    Other GL UDFs: None.
  417. // System variables: _screens_[]
  418. // System constants: MaxScreens
  419. //
  420. // See Also:
  421. // SAVE GRAPHICS SCREEN
  422. // 
  423. #command    RESTORE GRAPHICS SCREEN <label>;     // Completed 12-28-90
  424.                => __RestGScreen(<label>)
  425.  
  426.  
  427. // SHADE AREA AT -------------------------------------------------------------
  428. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  429. // 
  430. // Description:
  431. // This command will fill the area surrounding the row/column position out 
  432. // to the boundaries.  It uses dGE's shade() function and therefore requires 
  433. // that a graphical boundary exist.
  434. //
  435. // Syntax:
  436. // SHADE ARE AT <Pos1>,<Pos2>
  437. //
  438. // Arguments:
  439. // <Pos1> is the row screen coordinate inside the area to be shaded.
  440. // <Pos2> is the column screen coordinate inside the area to be shaded.
  441. // <pattern> is the dGE pattern number from 0 to 20.
  442. //    
  443. // Example:
  444. // SHADE ARE AT 10,20
  445. //
  446. //          Purpose: Draw a shaded area
  447. //  Mapped Function: __ShadeArea() contained in GLLIBR.PRG.
  448. //    dGE functions: None.
  449. //    Other GL UDFs: __XdGE(),__YdGE(),__DgeColor()
  450. // System constants: None.
  451. //
  452. // See Also:
  453. // 
  454. #command    SHADE AREA AT ;                      // Complete 12-26-90
  455.                   <Pos1>,<Pos2> ;
  456.                   [PATTERN <pattern>] ;
  457.                => __ShadeArea(<Pos1>,<Pos2>,<pattern>)
  458.  
  459.  
  460. // DRAW BOX FROM -------------------------------------------------------------
  461. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  462. // 
  463. // Description:
  464. // This command will draw a box from the specified upper left coordinates
  465. // to the specified lower right coordinates using a single line.  
  466. // Optionally, the box can be filled with a specified dGE pattern from 0 to
  467. // 20.  Unless a pattern is specified, the box will be clear.
  468. //
  469. // Syntax:
  470. // DRAW BOX FROM <Pos1_a>,Pos1_b> TO <Pos2_a>,<Pos2_b> ;
  471. //    [PATTERN <pattern>] 
  472. //    [BEVEL] 
  473. //
  474. // Arguments:
  475. // <Pos1_a> is the upper left row screen coordinate of the box.
  476. // <Pos1_b> is the upper left column screen coordinate of the box.
  477. // <Pos2_a> is the lower right row screen coordinate of the box.
  478. // <Pos2_b> is the lower right column screen coordinate of the box.
  479. // <pattern> is the dGE pattern number for the interior of the box.
  480. // [BEVEL] will cause the box to have three dimensional characteristics
  481. //   as though it was a raised button.
  482. //    
  483. // Example:
  484. // DRAW BOX FROM 05,02 TO 20,77 PATTERN 7    // draw a pattern filled box
  485. //
  486. //          Purpose: Draw a box
  487. //  Mapped Function: __DrawFrame() contained in GLLIBR.PRG.
  488. //    dGE functions: boxfill()
  489. //    Other GL UDFs: __XdGE(),__YdGE(),__XdGE_(),__YdGE_(),__DgeColor()
  490. // System variables: None.
  491. // System constants: None.
  492. //
  493. // See Also:
  494. // 
  495. #command    DRAW BOX FROM ;                      // Complete 12-26-90
  496.                   <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b> ;
  497.                   [PATTERN <pattern>] ;
  498.                   [<bev: BEVEL>] ;
  499.                => __DrawFrame(<Pos1_a>,<Pos1_b>,<Pos2_a>,<Pos2_b>,<pattern>,<.bev.>)
  500.  
  501.  
  502. // DRAW CIRCLE AT ------------------------------------------------------------
  503. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  504. // 
  505. // Description:
  506. // This command will draw a circle at the specified row/column coordinates
  507. // with a radius of <Pos2> characters.  The circle will be drawn with a 
  508. // solid line.
  509. //
  510. // Syntax:
  511. // DRAW CIRCLE AT <Pos1>,<Pos2> RADIUS <radius> 
  512.  
  513. // Arguments:
  514. // <Pos1> is the center point row screen coordinate from 0 to 24.
  515. // <Pos2> is the center point column screen coordinate from 0 to 79.
  516. // <radius> is the radius in <Pos2> coordinates from the center point.
  517. //    
  518. // Example:
  519. // DRAW CIRCLE AT 12,40 RADIUS 4
  520. //
  521. //          Purpose: Draw a circle
  522. //  Mapped Function: __DrawCircle() contained in GLLIBR.PRG.
  523. //    dGE functions: drawcircle()
  524. //    Other GL UDFs: __XdGE(),__YdGE(),__XdGE_(),__DgeColor()
  525. // System variables: None.
  526. // System constants: None.
  527. //
  528. // See Also:
  529. // 
  530. #command    DRAW CIRCLE AT ;                     // Complete 12-26-90
  531.                <Pos1>,<Pos2> RADIUS <radius> ;
  532.                => __DrawCircle(<Pos1>,<Pos2>,<radius>)
  533.  
  534.  
  535. // DRAW LINE FROM ------------------------------------------------------------
  536. // TecGuide-> {Language Ref::Graphical Commands::UDC}
  537. // 
  538. // Description:
  539. // This command will draw a solid line from Pos1__a,Pos1_b to Pos2_a,Pos2_b.
  540. // Optionally, the BROKEN clause will draw a dotted line.
  541. //
  542. // Syntax:
  543. // DRAW LINE FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b> [<BROKEN>] 
  544. //
  545. // Arguments:
  546. // <Pos1_a> is the starting row screen coordinate of the line.
  547. // <Pos1_b> is the starting column screen coordinate of the line.
  548. // <Pos2_a> is the ending row screen coordinate of the line.
  549. // <Pos2_b> is the ending column screen coordinate of the line.
  550. // <BROKEN> causes the line to be dotted.
  551. //    
  552. // Example:
  553. // DRAW LINE FROM 05,02 TO 20,77 [<BROKEN>] 
  554. //
  555. //          Purpose: Draw a line
  556. //  Mapped Function: __DrawLine() contained in GLLIBR.PRG.
  557. //    dGE functions: drawline()
  558. //    Other GL UDFs: __DgeColor()
  559. // System variables: None.
  560. // System constants: None.
  561. //
  562. // See Also:
  563. // 
  564. #command    DRAW LINE FROM ;                     // Complete 12-26-90
  565.                   <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b> ;
  566.                   [<bro: BROKEN>] ;
  567.                => __DrawLine(<Pos1_a>,<Pos1_b>,<Pos2_a>,<Pos2_b>, ;
  568.                   if(<.bro.>,1,0) ;
  569.                   )
  570.  
  571.  
  572. // SET CHARACTER SET ---------------------------------------------------------
  573. // TecGuide-> {Language Ref::String Commands::UDC}
  574. // 
  575. // Description:
  576. // This command lets you easily switch character fonts. Since superfonts are
  577. // usually desired, there is no command control of the dGE font buffers 0 and
  578. // 1.  The font file that corresponds to the selected font type and size must
  579. // be available in the current path or in the path specified by the DGE en-
  580. // vironment variable or in the SET DGE RESOURCES command.
  581. //
  582. // Syntax:
  583. // SET CHARACTER SET TO <type> <size>
  584. //
  585. // Arguments:
  586. // <type> is either SYSTEM, ROMAN, or SWISS.
  587. // <size> is either SMALL, STANDARD, or the four digit character font number.
  588. //    
  589. // Example:
  590. // SET CHARACTER SET TO SYSTEM SMALL         // select small system chr set
  591. //
  592. //          Purpose: Select a character set and size
  593. //  Mapped Function: __SetCSet() contained in GLLIBR.PRG.
  594. //    dGE functions: loadcset()
  595. //    Other GL UDFs: None.
  596. // System variables: None.
  597. // System constants: None.
  598. //
  599. // See Also:
  600. // 
  601. #command    SET CHARACTER SET TO ;               // Completed 12-24-90
  602.                   <type> ;
  603.                   [<size>] ;
  604.                => __SetCSet(<"type">,<"size">)
  605.  
  606.  
  607. // DRAW <string> AT ----------------------------------------------------------
  608. // TecGuide-> {Language Ref::String Commands::UDC}
  609. // 
  610. // Description:
  611. // This command will draw text at a specified row and column position using
  612. // the current character set unless specified following the USING clause.
  613. // Additionally, text can be diplayed in a vertical format by simply adding
  614. // the VERTICAL option, or horizontally cenetered with the CENTER option.
  615. //
  616. // Syntax:
  617. // DRAW <string> AT <Pos1>,<Pos2> USING <type> <size>
  618. //
  619. // Arguments:
  620. // <string> is the text to be drawn in graphics mode.
  621. // <Pos1> is the row coordinate 0 to 24.
  622. // <Pos2> is the column coordinate 0 to 79.
  623. // <type> is the character font system, roman, or swiss.
  624. // <size> is the character font size specified as small, standard, or the
  625. //   character font number.
  626. // <VERTICAL> is stated to display the text in a vertical mode.  Horizontal
  627. //   is the default mode.
  628. // <CENTER> is used to display the text in centered mode at the point of
  629. //   origin.
  630. // <RIGHT> is used to display the text in right justified mode at the point
  631. //   of origin.
  632. //    
  633. // Example:
  634. // DRAW "The Graphics Language" AT 02,30 USING system 1609
  635. //
  636. //          Purpose: Draw a text string
  637. //  Mapped Function: __DrawText() contained in GLLIBR.PRG.
  638. //    dGE functions: saystring()
  639. //    Other GL UDFs: __SetCSet(),__XdGE(),__YdGE(),__DgeColor()
  640. // System variables: None.
  641. // System constants: None.
  642. //
  643. // See Also:
  644. // 
  645. #command    DRAW <string> AT <Pos1>,<Pos2> ;     // Completed 12-24-90
  646.                   [USING <type> <size>] ;
  647.                   [<ver: VERTICAL>] ;
  648.                   [<cen: CENTER,CENTRE>] ;
  649.                   [LEFT] ;                       // no-op command
  650.                   [<rig: RIGHT>] ;
  651.                => __DrawText(<string>, ;
  652.                   <Pos1>, ;
  653.                   <Pos2>, ;
  654.                   <"type">, ;
  655.                   <"size">, ;
  656.                   if(<.ver.>,1,0), ;
  657.                   if(<.cen.>,8,0), ;
  658.                   if(<.rig.>,16,0) ;
  659.                   )
  660.  
  661.  
  662. // @ <pos1>,<pos2> DRAW <string> ---------------------------------------------
  663. // TecGuide-> {Language Ref::String Commands::UDC}
  664. // 
  665. // Description:
  666. // This command will draw text at a specified row and column position using
  667. // the current character set unless specified following the USING clause.
  668. // Additionally, text can be diplayed in a vertical format by simply adding
  669. // the VERTICAL option, or horizontally cenetered with the CENTER option.
  670. //
  671. // Syntax:
  672. // @ <pos1>,<pos2> DRAW <string> USING <type> <size>
  673. // 
  674. //
  675. // Arguments:
  676. // <string> is the text to be drawn in graphics mode.
  677. // <Pos1> is the row coordinate 0 to 24.
  678. // <Pos2> is the column coordinate 0 to 79.
  679. // <type> is the character font system, roman, or swiss.
  680. // <size> is the character font size specified as small, standard, or the
  681. //   character font number.
  682. // <VERTICAL> is stated to display the text in a vertical mode.  Horizontal
  683. //   is the default mode.
  684. // <CENTER> is used to display the text in centered mode at the point of
  685. //   origin.
  686. // <RIGHT> is used to display the text in right justified mode at the point
  687. //   of origin.
  688. //    
  689. // Example:
  690. // @ 02,30 DRAW "The Graphics Language" USING system 1609
  691. //
  692. //          Purpose: Draw a text string
  693. //  Mapped Function: __DrawText() contained in GLLIBR.PRG.
  694. //    dGE functions: saystring()
  695. //    Other GL UDFs: __SetCSet(),__XdGE(),__YdGE(),__DgeColor()
  696. // System variables: None.
  697. // System constants: None.
  698. //
  699. // See Also:
  700. // 
  701. #command    @ <Pos1>,<Pos2> DRAW <string> ;      // Completed 12-24-90
  702.                   [USING <type> <size>] ;
  703.                   [<ver: VERTICAL>] ;
  704.                   [<cen: CENTER,CENTRE>] ;
  705.                   [LEFT] ;                       // no-op command
  706.                   [<rig: RIGHT>] ;
  707.                => __DrawText(<string>, ;
  708.                   <Pos1>, ;
  709.                   <Pos2>, ;
  710.                   <"type">, ;
  711.                   <"size">, ;
  712.                   if(<.ver.>,1,0), ;
  713.                   if(<.cen.>,8,0), ;
  714.                   if(<.rig.>,16,0) ;
  715.                   )
  716.  
  717.  
  718. // CLEAR PREVIOUS STRING -----------------------------------------------------
  719. // TecGuide-> {Language Ref::String Commands::UDC}
  720. // 
  721. // Description:
  722. // This command will erase the most recent string display accomplished with
  723. // dGE's saystring() function or the DRAW <string> command.  The cleared area
  724. // will not disturb the background color established by SET PALETTE.
  725. //
  726. // Syntax:
  727. // CLEAR PREVIOUS STRING
  728. //
  729. // Arguments:
  730. // None.
  731. //    
  732. // Example:
  733. // CLEAR PREVIOUS STRING                  // clear the most recent text draw
  734. //
  735. //          Purpose: Clear the previous text draw
  736. //  Mapped Function: 
  737. //    dGE functions: clrstring()
  738. //    Other GL UDFs: None.
  739. // System variables: None.
  740. // System constants: None.
  741. //
  742. // See Also:
  743. // 
  744. #command    CLEAR PREVIOUS STRING ;              // Completed 12-24-90
  745.                => clrstring()
  746.  
  747.  
  748. // SET PROMPT DELIMITER ------------------------------------------------------
  749. // TecGuide-> {Language Ref::String Commands::UDC}
  750. // 
  751. // Description:
  752. // This command establishes the delimiter character for use with the dGE
  753. // getstring() and edstring() functions.
  754. //
  755. // Syntax:
  756. // SET PROMPT DELIMITER TO <character>
  757. //
  758. // Arguments:
  759. // <character> is the character to be used as the prompt delimiter.
  760. //    
  761. // Example:
  762. // SET PROMPT DELIMITER TO ":"               // set the dGE prompt delimiter
  763. //
  764. //          Purpose: Set the prompt delimiter character
  765. //  Mapped Function: __SetDelimiter() contained in GLLIBR.PRG.
  766. //    dGE functions: setdelim()
  767. //    Other GL UDFs: None.
  768. // System variables: None.
  769. // System constants: None.
  770. //
  771. // See Also:
  772. // 
  773. #command    SET PROMPT DELIMITER TO ;            // Completed 12-24-90
  774.                   <character> ;
  775.                => __SetDelimiter(<"character">)
  776.  
  777.  
  778. // SET ICON ------------------------------------------------------------------
  779. // TecGuide-> {Language Ref::Icon Commands::UDC}
  780. // 
  781. // Description:
  782. // This command establishes the current super icon file that is used for all
  783. // subsequent icon drawings.  The icon files included with the Graphics
  784. // Language are named ICONS000.ICO through ICONS010.ICO and include various
  785. // icons for use in menu design and development.  Each ICO file contains 8
  786. // icons and can be modified with dGE's GFONT font editor. 
  787. //
  788. // Syntax:
  789. // SET ICON TO <iconfile>
  790. //
  791. // Arguments:
  792. // <iconfile> is the name of an icon file that is loaded into the current
  793. //   icon buffer.
  794. //    
  795. // Example:
  796. // SET ICON TO SAMPLE.ICO                    // select an icon file for use
  797. //
  798. //          Purpose: Select an icon file for use
  799. //  Mapped Function: __SetIcon() contained in GLLIBR.PRG.
  800. //    dGE functions: loadicon()
  801. //    Other GL UDFs: None.
  802. // System variables: None.
  803. // System constants: None.
  804. //
  805. // See Also:
  806. // 
  807. #command    SET ICON TO ;                        // Complete 12-24-90
  808.                   [<iconfile>] ;
  809.                 => __SetIcon(<"iconfile">)
  810.  
  811.  
  812. // @ <Pos1>,<Pos2> DRAW STD ICON ----------------------------------------------
  813. // TecGuide-> {Language Ref::Icon Commands::UDC}
  814. // 
  815. // Description:
  816. // This command displays internal dGE icons in graphical mode.  Standard
  817. // icons are resident in dGE and can be displayed at any time by simply 
  818. // specifying the internal icon number.
  819. //
  820. // Syntax:
  821. // @ <Pos1>,<Pos2> DRAW [STD] [STANDARD] ICON <icon>
  822. //    [VECTOR] [XOR]
  823. //
  824. // Arguments:
  825. // [STANDARD] or [STD] is specified to indicate that icons are to be
  826. //   selected from the standard resident dGE icons.
  827. // <icon> is the icon number to be drawn from 0 to 7.
  828. // <Pos1> is the x screen coordinate from 0 to 24.
  829. // <Pos2> is the y screen coordinate from 0 to 79.
  830. // [<VECTOR>] sets the origin in length/angle format or "vector" mode.
  831. //   The default origin is cartesion or "x/y" mode.
  832. // [<XOR>] sets the xor mode.
  833. //    
  834. // Example:
  835. // @ 10,20 DRAW STD ICON 7                   // display current icon # 7
  836. //
  837. //          Purpose: Display one of eight standard dGE icons
  838. //  Mapped Function: __DrawStdIcon() contained in GLLIBR.PRG.
  839. //    dGE functions: drawicon()
  840. //    Other GL UDFs: __DgeColor()
  841. // System variables: None.
  842. // System constants: None.
  843. //
  844. // See Also:
  845. // 
  846. #command    @ <Pos1>,<Pos2> DRAW [STANDARD] [STD] ICON <icon> ;  // Complete 12-24-90
  847.                   [<vec: VECTOR>] ;
  848.                   [<xor: XOR>] ;
  849.                => __DrawStdIcon(<icon>, ;
  850.                   <Pos1>, ;
  851.                   <Pos2>, ;
  852.                   <.vec.>, ;
  853.                   <.xor.> ;
  854.                   )
  855.  
  856.  
  857. // DRAW STD ICON <icon> -------------------------------------------------------
  858. // TecGuide-> {Language Ref::Icon Commands::UDC}
  859. // 
  860. // Description:
  861. // This command displays internal dGE icons in graphical mode.  Standard
  862. // icons are resident in dGE and can be displayed at any time by simply 
  863. // specifying the internal icon number.
  864. //
  865. // Syntax:
  866. // DRAW [STD] [STANDARD] ICON <icon> AT <Pos1>,<Pos2>
  867. //    [VECTOR] [XOR]
  868. //
  869. // Arguments:
  870. // [STANDARD] or [STD] is specified to indicate that icons are to be
  871. //   selected from the standard resident dGE icons.
  872. // <icon> is the icon number to be drawn from 0 to 7.
  873. // <Pos1> is the x screen coordinate from 0 to 24.
  874. // <Pos2> is the y screen coordinate from 0 to 79.
  875. // [<VECTOR>] sets the origin in length/angle format or "vector" mode.
  876. //   The default origin is cartesion or "x/y" mode.
  877. // [<XOR>] sets the xor mode.
  878. //    
  879. // Syntax:
  880. // DRAW [STANDARD] [STD] ICON <icon> AT <Pos1>,<Pos2> 
  881. //   [<VECTOR>]
  882. //   [<XOR>]
  883. //
  884. // Example:
  885. // DRAW STD ICON 7 AT 10,20                  // display current icon # 7
  886. //
  887. //          Purpose: Display one of eight standard dGE icons
  888. //  Mapped Function: __DrawStdIcon() contained in GLLIBR.PRG.
  889. //    dGE functions: drawicon()
  890. //    Other GL UDFs: __DgeColor()
  891. // System variables: None.
  892. // System constants: None.
  893. //
  894. // See Also:
  895. // 
  896. #command    DRAW [STANDARD] [STD] ICON <icon> AT ;  // Complete 12-24-90
  897.                   <Pos1>,<Pos2> ;
  898.                   [<vec: VECTOR>] ;
  899.                   [<xor: XOR>] ;
  900.                => __DrawStdIcon(<icon>, ;
  901.                   <Pos1>, ;
  902.                   <Pos2>, ;
  903.                   <.vec.>, ;
  904.                   <.xor.> ;
  905.                   )
  906.  
  907.  
  908. // @ <Pos1>,<Pos2> DRAW SUPER ICON --------------------------------------------
  909. // TecGuide-> {Language Ref::Icon Commands::UDC}
  910. // 
  911. // Description:
  912. // This command displays a selection from the current super icon file loaded
  913. // with the most recent SET ICON TO <iconfile> command.  Super icons can be
  914. // created and modified using dGE's GFONT font editor.
  915. //
  916. // Syntax:
  917. // @ <Pos1>,<Pos2> DRAW SUPER ICON <icon>
  918. //   [VECTOR]
  919. //   [REPLACE] 
  920. //   [OR] 
  921. //   [BLACK] 
  922. //   [INVERSE] 
  923. //   [COMPOSITE]
  924. //   [OVERLAY <color1> <color2> <color3> <color4>]
  925. //
  926. // Arguments:
  927. // <icon> is the icon number to be displayed from 0 to 7.
  928. // <Pos1> is the row screen coordinate from 0 to 24.
  929. // <Pos2> is the column screen coordinate from 0 to 79.
  930. // [VECTOR] sets the origin in length/angle format or "vector" mode.  The 
  931. //   default origin is Cartesion or "x/y" mode.
  932. // [REPLACE] sets the replace mode.
  933. // [OR] sets the or mode.
  934. // [BLACK] sets the black mode.
  935. // [INVERSE] sets the inverse mode.
  936. // [COMPOSITE] draws 4 icons at the centerpoint <Pos1>,<Pos2> without
  937. //   overlaying the images.
  938. // [OVERLAY <color1> <color2> <color3> <color4>] displays an overlay of
  939. //   icons in positions 0 through 3 or 4 through 7 using the colors speci-
  940. //   fied in the tokens 1 through 4.
  941. //    
  942. // Example:
  943. // @ 10,20 DRAW SUPER ICON 7                 // display super icon # 7
  944. //
  945. //          Purpose: Display one or more of eight current super icons
  946. //  Mapped Function: __DrawSuperIcon() contained in GLLIBR.PRG.
  947. //    dGE functions: drawicon()
  948. //    Other GL UDFs: __DgeColor()
  949. // System variables: None.
  950. // System constants: None.
  951. //
  952. // See Also:
  953. // 
  954. #command    @ <Pos1>,<Pos2> DRAW SUPER ICON <icon> ;  // Complete 12-28-90
  955.                   [<vec: VECTOR>] ;
  956.                   [<rep: REPLACE>] ;
  957.                   [<orr: OR>] ;
  958.                   [<bla: BLACK>] ;
  959.                   [<inv: INVERSE>] ;
  960.                   [<com: COMPOSITE>] ;
  961.                   [OVERLAY <p1> <p2> <p3> <p4>] ;
  962.                => __DrawSuperIcon(<icon>, ;
  963.                   <Pos1>, ;
  964.                   <Pos2>, ;
  965.                   <.vec.>, ;
  966.                   <.rep.>, ;
  967.                   <.orr.>, ;
  968.                   <.bla.>, ;
  969.                   <.inv.>, ;
  970.                   <.com.>, ;
  971.                   <p1>, ;
  972.                   <p2>, ;
  973.                   <p3>, ;
  974.                   <p4>  ;
  975.                   )
  976.  
  977.  
  978. // DRAW SUPER ICON <icon> -----------------------------------------------------
  979. // TecGuide-> {Language Ref::Icon Commands::UDC}
  980. // 
  981. // Description:
  982. // This command displays a selection from the current super icon file loaded
  983. // with the most recent SET ICON TO <iconfile> command.  Super icons can be
  984. // created and modified using dGE's GFONT font editor.
  985. //
  986. // Syntax:
  987. // @ <Pos1>,<Pos2> DRAW SUPER ICON <icon>
  988. //   [VECTOR]
  989. //   [REPLACE] 
  990. //   [OR] 
  991. //   [BLACK] 
  992. //   [INVERSE] 
  993. //   [COMPOSITE]
  994. //   [OVERLAY <color1> <color2> <color3> <color4>]
  995. //
  996. // Arguments:
  997. // <icon> is the icon number to be displayed from 0 to 7.
  998. // <Pos1> is the row screen coordinate from 0 to 24.
  999. // <Pos2> is the column screen coordinate from 0 to 79.
  1000. // [VECTOR] sets the origin in length/angle format or "vector" mode.  The 
  1001. //   default origin is Cartesion or "x/y" mode.
  1002. // [REPLACE] sets the replace mode.
  1003. // [OR] sets the or mode.
  1004. // [BLACK] sets the black mode.
  1005. // [INVERSE] sets the inverse mode.
  1006. // [COMPOSITE] draws 4 icons at the centerpoint <Pos1>,<Pos2> without
  1007. //   overlaying the images.
  1008. // [OVERLAY <color1> <color2> <color3> <color4>] displays an overlay of
  1009. //   icons in positions 0 through 3 or 4 through 7 using the colors speci-
  1010. //   fied in the tokens 1 through 4.
  1011. //    
  1012. // Example:
  1013. // DRAW SUPER ICON 7 AT 10,20                // display super icon # 7
  1014. //
  1015. //          Purpose: Display one of eight current super icons
  1016. //  Mapped Function: __DrawSuperIcon() contained in GLLIBR.PRG.
  1017. //    dGE functions: drawicon()
  1018. //    Other GL UDFs: __DgeColor()
  1019. // System variables: None.
  1020. // System constants: None.
  1021. //
  1022. // See Also:
  1023. // 
  1024. #command    DRAW SUPER ICON <icon> ;             // Complete 12-24-90
  1025.                   AT <Pos1>,<Pos2> ;
  1026.                   [<vec: VECTOR>] ;
  1027.                   [<rep: REPLACE>] ;
  1028.                   [<orr: OR>] ;
  1029.                   [<bla: BLACK>] ;
  1030.                   [<inv: INVERSE>] ;
  1031.                   [<com: COMPOSITE>] ;
  1032.                   [OVERLAY <p1> <p2> <p3> <p4>] ;
  1033.                => __DrawSuperIcon(<icon>, ;
  1034.                   <Pos1>, ;
  1035.                   <Pos2>, ;
  1036.                   <.vec.>, ;
  1037.                   <.rep.>, ;
  1038.                   <.orr.>, ;
  1039.                   <.bla.>, ;
  1040.                   <.inv.>, ;
  1041.                   <.com.>, ;
  1042.                   <p1>, ;
  1043.                   <p2>, ;
  1044.                   <p3>, ;
  1045.                   <p4>  ;
  1046.                   )
  1047.  
  1048.  
  1049. // SET GRAPHICS PRINT ---------------------------------------------------------
  1050. // TecGuide-> {Language Ref::Printer Commands::UDC}
  1051. // 
  1052. // Description:
  1053. // This command will establish a printer device and channel for all printer
  1054. // output.
  1055. //
  1056. // Syntax:
  1057. // SET GRAPHICS PRINT TO <device>
  1058. //
  1059. // Arguments:
  1060. // LPT1, LPT2, LPT3, COM1, or COM2.
  1061. //
  1062. // Example:
  1063. // SET GRAPHICS PRINT TO com1             // send output to serial, com1
  1064. //    
  1065. //          Purpose: Establish the print device and channel
  1066. //  Mapped Function: __SetPrintDevice() contained in GLLIBR.PRG.
  1067. //    dGE functions: prndev()
  1068. //    Other GL UDFs: None.
  1069. // System variables: None.
  1070. // System constants: None.
  1071. //
  1072. // See Also:
  1073. // 
  1074. #command    SET GRAPHICS PRINT TO ;              // Complete 12-28-90
  1075.                   [<lpt1: LPT1>] ;
  1076.                   [<lpt2: LPT2>] ;
  1077.                   [<lpt3: LPT3>] ;
  1078.                   [<com1: COM1>] ;
  1079.                   [<com2: COM2>] ;
  1080.                => __SetPrintDevice( ;
  1081.                   <.lpt1.>, ;
  1082.                   <.lpt2.>, ;
  1083.                   <.lpt3.>, ;
  1084.                   <.com1.>, ;
  1085.                   <.com2.> ;
  1086.                   )
  1087.  
  1088.  
  1089. // PRINT IMAGE TO MATRIX -----------------------------------------------------
  1090. // TecGuide-> {Language Ref::Printer Commands::UDC}
  1091. // 
  1092. // Description:
  1093. // This command prints the current graphical screen image to a dot matrix 
  1094. // printer.
  1095. //
  1096. // Syntax:
  1097. // PRINT IMAGE TO MATRIX 
  1098. //
  1099. // Arguments:
  1100. // None.
  1101. //    
  1102. // Example:
  1103. // PRINT IMAGE TO MATRIX 
  1104. //
  1105. //          Purpose: Print the screen to a matrix printer
  1106. //  Mapped Function: __PrintMatrix() contained in GLLIBR.PRG.
  1107. //    dGE functions: printscr()
  1108. //    Other GL UDFs: None.
  1109. // System variables: None.
  1110. // System constants: None.
  1111. //
  1112. // See Also:
  1113. // 
  1114. #command    PRINT IMAGE TO MATRIX ;              // Complete 12-27-90
  1115.                => __PrintMatrix()
  1116.  
  1117.  
  1118. // PRINT IMAGE TO LASER ------------------------------------------------------
  1119. // TecGuide-> {Language Ref::Printer Commands::UDC}
  1120. // 
  1121. // Description:
  1122. // This command prints the current graphical screen to a laser printer.
  1123. //
  1124. // Syntax:
  1125. // PRINT IMAGE TO LASER 
  1126. //    [<RESET>] 
  1127. //    [<FORMFEED>] 
  1128. //    [<ASPECT>] 
  1129. //    [<PAINTJET>]
  1130. //    [<BWPAINTJET>]
  1131. //    [<LANDSCAPE>]
  1132. //    [<REVERSE>]
  1133. //    [HORIZONTAL OFFSET <hoffset>]
  1134. //    [VERTICAL OFFSET <voffset>]
  1135. //    [DENSITY <density>]
  1136. //
  1137. // Arguments:
  1138. // <RESET>
  1139. // <FORMFEED>
  1140. // <ASPECT>
  1141. // <PAINTJET>
  1142. // <BWPAINTJET>
  1143. // <LANDSCAPE>
  1144. // <REVERSE>
  1145. // <hoffset>
  1146. // <voffset>
  1147. // <density>
  1148. //    
  1149. // Example:
  1150. // PRINT IMAGE TO LASER FORMFEED
  1151. //
  1152. //          Purpose: Print the screen to a laser printer
  1153. //  Mapped Function: __PrintLaser() contained in GLLIBR.PRG.
  1154. //    dGE functions: printpcl()
  1155. //    Other GL UDFs: None.
  1156. // System variables: None.
  1157. // System constants: None.
  1158. //
  1159. // See Also:
  1160. // 
  1161. #command    PRINT IMAGE TO LASER ;               // Incomplete
  1162.                   [<res: RESET>] ;
  1163.                   [<ffd: FORMFEED>] ;
  1164.                   [<asp: ASPECT>] ;
  1165.                   [<pai: PAINTJET>];
  1166.                   [<bwp: BWPAINTJET>];
  1167.                   [<lan: LANDSCAPE>];
  1168.                   [<rev: REVERSE>];
  1169.                   [HORIZONTAL OFFSET <hoffset>];
  1170.                   [VERTICAL OFFSET <voffset>];
  1171.                   [DENSITY <density>];
  1172.                => __PrintLaser( ;
  1173.                   if(<.res.>,1,0), ;
  1174.                   if(<.ffd.>,2,0), ;
  1175.                   if(<.asp.>,4,0), ;
  1176.                   if(<.pai.>,8,0), ;
  1177.                   if(<.bwp.>,16,0), ;
  1178.                   if(<.lan.>,32,0) ;
  1179.                   if(<.rev.>,64,0) ;
  1180.                   <hoffset>, ;
  1181.                   <voffset>, ;
  1182.                   <density>)
  1183.  
  1184.  
  1185. // PRINT IMAGE TO POSTSCRIPT -------------------------------------------------
  1186. // TecGuide-> {Language Ref::Printer Commands::UDC}
  1187. // 
  1188. // Description:
  1189. // This command prints the current graphical screen to a postscript
  1190. // printer.
  1191. //
  1192. // Syntax:
  1193. // PRINT IMAGE TO POSTSCRIPT 
  1194. //    [LANDSCAPE]
  1195. //    [REVERSE]
  1196. //    [HORIZONTAL OFFSET <hoffset>]
  1197. //    [VERTICAL OFFSET <voffset>]
  1198. //    [HORIZONTAL SCALE <hscale>]
  1199. //    [VERTICAL SCALE <vscale>]
  1200. //    [DENSITY <density>]
  1201. //
  1202. // Arguments:
  1203. // [LANDSCAPE] will print the image in a landscape mode.
  1204. // [REVERSE] will print the image in reverse mode.
  1205. // <hoffset> is the horizontal offset from the left of the page.
  1206. // <voffset> is the vertical offset from the base of the page.
  1207. // <hlength> is the base length of the image on the page.
  1208. // <vscale> is the specifies the Cartesian Y axis scale factor percent.
  1209. // <density>
  1210. //    
  1211. // Example:
  1212. // PRINT IMAGE TO POSTSCRIPT LANDSCAPE
  1213. //
  1214. //          Purpose: Print the screen to a Post Script printer
  1215. //  Mapped Function: __PrintPostScript() contained in GLLIBR.PRG.
  1216. //    dGE functions: printps()
  1217. //    Other GL UDFs: None.
  1218. // System variables: None.
  1219. // System constants: None.
  1220. //
  1221. // See Also:
  1222. // 
  1223. #command    PRINT IMAGE TO POSTSCRIPT ;          // Incomplete
  1224.                   [<lan: LANDSCAPE>];
  1225.                   [<rev: REVERSE>];
  1226.                   [HORIZONTAL OFFSET <hoffset>];
  1227.                   [VERTICAL OFFSET <voffset>];
  1228.                   [HORIZONTAL SCALE <hscale>];
  1229.                   [VERTICAL SCALE <vscale>];
  1230.                   [DENSITY <density>];
  1231.                => __PrintPostScript( ;
  1232.                   if(<.lan.>,32,0), ;
  1233.                   if(<.rev.>,64,0), ;
  1234.                   <hoffset>, ;
  1235.                   <voffset>, ;
  1236.                   <hscale>, ;
  1237.                   <vscale>, ;
  1238.                   <density>)
  1239.  
  1240.  
  1241. // SET VECTOR PRINT ------------------------------------------------------
  1242. // TecGuide-> {Language Ref::Printer Commands::UDC}
  1243. // 
  1244. // Description:
  1245. // This command toggles vector printing to an ON or OFF state and accepts
  1246. // commands to control page eject, color, and other aspects of vector
  1247. // printing.  This command, without any arguments will toggle vector
  1248. // printing off and eject the current page.
  1249. //
  1250. // Syntax:
  1251. // SET VECTOR PRINT [ON] [OFF]
  1252. //    [HORIZONTAL OFFSET <hoffset>]
  1253. //    [VERTICAL OFFSET <voffset>]
  1254. //    [HORIZONTAL LENGTH <hlength>]
  1255. //    [UNITS <units>]
  1256. //    [VERTICAL SCALE <vscale>]
  1257. //    [PORTRAIT]
  1258. //    [PCL5]
  1259. //    [LASERJET]
  1260. //    [POSTSCRIPT]
  1261. //    [WINDOW]
  1262. //    [COLOR]
  1263. //    [PATTERN]
  1264. //    [EJECT]
  1265. //    [NOEJECT]
  1266. //
  1267. // Arguments:
  1268. // <hoffset> is the horizontal offset from the left of the page.
  1269. // <voffset> is the vertical offset from the base of the page.
  1270. // <hlength> is the base length of the image on the page.
  1271. // <units> is the specifies either "MMS", points "1/72" nd of an inch, or
  1272. //   "1/100" th of an inch.
  1273. // <vscale> is the specifies the Cartesian Y axis scale factor percent.
  1274. // [PORTRAIT] is the invokes an orientation angle on page of 90 degrees.
  1275. // [PCL5] invokes a printing mode that supports HPGL, LaserJet III and above,
  1276. //   and any printer that supports HPGL plotter emulation.
  1277. // [LASERJET] is synonomous with PCL5.
  1278. // [POSTSCRIPT] invokes a Postscript printing mode.
  1279. // [WINDOW] prints within the current clipping window.
  1280. // [COLOR] is the invokes postscript color printing mode.
  1281. // [PATTERN] is the invokes postscript pattern priority.
  1282. // [NOEJECT] is the suppresses page ejecting when toggling postscript 
  1283. //   printing to the OFF state.
  1284. //    
  1285. // Example:
  1286. // SET VECTOR PRINT ON LASERJET              // toggle vector print on
  1287. // * drawing commands *
  1288. // SET VECTOR PRINT OFF EJECT                // toggle vector off, eject
  1289. //
  1290. //          Purpose: Set the vector print feature ON or OFF
  1291. //  Mapped Function: __SetVectorPrint() contained in GLLIBR.PRG.
  1292. //    dGE functions: printps(),vpon(),vpoff()
  1293. //    Other GL UDFs: None.
  1294. // System variables: None.
  1295. // System constants: None.
  1296. //
  1297. // See Also:
  1298. // 
  1299. #command    SET VECTOR PRINT ;                   // Complete 12-29-90
  1300.                   [<pon: ON>];
  1301.                   [HORIZONTAL OFFSET <hoffset>];
  1302.                   [VERTICAL OFFSET <voffset>];
  1303.                   [HORIZONTAL LENGTH <hlength>];
  1304.                   [UNITS <units>];
  1305.                   [VERTICAL SCALE <vscale>];
  1306.                   [<por: PORTRAIT>];
  1307.                   [PCL5];                        // this is a no-op default
  1308.                   [LASERJET];                    // this is a no-op default
  1309.                   [<pos: POSTSCRIPT>];
  1310.                   [<win: WINDOW>];
  1311.                   [<col: COLOR,COLOUR>];
  1312.                   [<pat: PATTERN>];
  1313.                   [OFF];                         // this is a no-op default
  1314.                   [EJECT];                       // this is a no-op default
  1315.                   [<noe: NOEJECT>];
  1316.                => __SetVectorPrint( ;
  1317.                   if(<.pon.>,1,2), ;             // command (on or off)
  1318.                   <hoffset>, ;                   // horizontal offset
  1319.                   <voffset>, ;                   // vertical offset
  1320.                   <hlength>, ;                   // base length
  1321.                   <"units">, ;                   // units (mms, points, inch)
  1322.                   <vscale>, ;                    // Y axis scale factor
  1323.                   if(<.por.>,90,0), ;            // orientation (default to 0)
  1324.                   if(<.pos.>,-1,0), ;            // Postscript
  1325.                   if(<.win.>,8,0), ;             // clipping window
  1326.                   if(<.col.>,16,0), ;            // color printing
  1327.                   if(<.pat.>,32,0), ;            // pattern priority
  1328.                   if(<.noe.>,1,0) ;              // no eject
  1329.                   )
  1330.  
  1331.  
  1332. // SET MOUSE ------------------------------------------------------------------
  1333. // TecGuide-> {Language Ref::Event Commands::UDC}
  1334. // 
  1335. // Description:
  1336. // This command hides or displays the mouse cursor.
  1337. //
  1338. // Syntax:
  1339. // SET MOUSE <status>
  1340. //
  1341. // Arguments:
  1342. // <status> is either ON or OFF.
  1343. //    
  1344. // Example:
  1345. // SET MOUSE ON                              // display the mouse cursor
  1346. //
  1347. //          Purpose: Hide or display the mouse cursor
  1348. //  Mapped Function: __SetGMouse() contained in GLLIBR.PRG.
  1349. //    dGE functions: mreset(),mcuron(),mcuroff(),mcuron()
  1350. //    Other GL UDFs: None.
  1351. // System variables: None.
  1352. // System constants: None.
  1353. //
  1354. // See Also:
  1355. // 
  1356. #command    SET MOUSE ;                          // Complete 12-27-90
  1357.                   [<on: ON>] ;
  1358.                   [OFF] ;                        // no-op
  1359.                => __SetGMouse(<.on.>,NIL)
  1360.  
  1361.  
  1362. // SET MOUSE CURSOR TO -------------------------------------------------------
  1363. // TecGuide-> {Language Ref::Event Commands::UDC}
  1364. // 
  1365. // Description:
  1366. // This command establishes the mouse cursor type and initializes the dGE
  1367. //   mouse support.  The default cursor type, if unspecified is an ARROW.
  1368. //
  1369. // Syntax:
  1370. // SET MOUSE CURSOR TO <type>
  1371. //
  1372. // Arguments:
  1373. // <type> is the cursor type desired, either CROSS or ARROW.
  1374. //    
  1375. // Example:
  1376. // SET MOUSE CURSOR TO CROSS                 // init cross mouse cursor
  1377. //
  1378. //          Purpose: Select the mouse cursor type
  1379. //  Mapped Function: __SetGMouse() contained in GLLIBR.PRG.
  1380. //    dGE functions: mreset(),mcuron(),mcuroff(),mcuron()
  1381. //    Other GL UDFs: None.
  1382. // System variables: None.
  1383. // System constants: None.
  1384. //
  1385. // See Also:
  1386. // 
  1387. #command    SET MOUSE CURSOR TO ;                // Complete 12-27-90
  1388.                   [<cro: CROSS>] ;
  1389.                   [ARROW] ;                      // no-op
  1390.                => __SetGMouse(NIL,if(<.cro.>,1,0))
  1391.  
  1392.  
  1393. // DEFINE MOUSE WINDOW FROM --------------------------------------------------
  1394. // TecGuide-> {Language Ref::Event Commands::UDC}
  1395. // 
  1396. // Description:
  1397. // This command defines the boundaries of free movement of the mouse cursor.
  1398. // The default mouse window area is from 0.0 to 24,79.
  1399. //
  1400. // Syntax:
  1401. // DEFINE MOUSE WINDOW FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>
  1402. //
  1403. // Arguments:
  1404. //   <Pos1_a> is the upper left x screen coordinate from 0 to 24.
  1405. //   <Pos1_b> is the upper left y screen coordinate from 0 to 79.
  1406. //   <Pos2_a> is the lower right x screen coordinate from 0 to 24.
  1407. //   <Pos2_b> is the lower right y screen coordinate from 0 to 79.
  1408. //    
  1409. // Example:
  1410. // DEFINE MOUSE WINDOW FROM ;                // set the mouse movement area
  1411. //   05,02 TO 10,57
  1412. //
  1413. //          Purpose: Define the free movement of the mouse
  1414. //  Mapped Function: __DefineMouseWindow() contained in GLLIBR.PRG.
  1415. //    dGE functions: msetwin()
  1416. //    Other GL UDFs: __XdGE(),__YdGE(),__XdGE(),__YdGE()
  1417. // System variables: None.
  1418. // System constants: None.
  1419. //
  1420. // See Also:
  1421. // 
  1422. #command    DEFINE MOUSE WINDOW FROM ;           // Complete 12-27-90
  1423.                   <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>;
  1424.                => __DefineMouseWindow(<Pos1_a>,<Pos1_b>,<Pos2_a>,<Pos2_b>)
  1425.  
  1426.  
  1427. // FIX MOUSE POSITION AT -----------------------------------------------------
  1428. // TecGuide-> {Language Ref::Event Commands::UDC}
  1429. // 
  1430. // Description:
  1431. // This command positions the mouse cursor at the specified row/column
  1432. // screen coordinates.  It is useful in moving the mouse for the operator 
  1433. // and in the design of mouse supported tutorials.
  1434. //
  1435. // Syntax:
  1436. // FIX MOUSE POSITION AT <Pos1>,<Pos2>
  1437. //
  1438. // Arguments:
  1439. //   <Pos1> is the row screen coordinate of the position from 0 to 24.
  1440. //   <Pos2> is the col screen coordinate of the position from 0 to 79.
  1441. //    
  1442. // Example:
  1443. // FIX MOUSE POSITION AT 10,20               // move the mouse cursor
  1444. //
  1445. //          Purpose: Set the mouse cursor position
  1446. //  Mapped Function: __FixMousePosition() contained in GLLIBR.PRG.
  1447. //    dGE functions: mfixpos()
  1448. //    Other GL UDFs: None.
  1449. // System variables: None.
  1450. // System constants: None.
  1451. //
  1452. // See Also:
  1453. // 
  1454. #command    FIX MOUSE POSITION AT ;              // Complete 12-24-90
  1455.                   <Pos1>,<Pos2> ;
  1456.                => __FixMousePosition(<Pos1>,<Pos2>)
  1457.  
  1458.  
  1459. // SET EVENT SHADOW TO <color> ------------------------------------------------
  1460. // TecGuide-> {Language Ref::Event Commands::UDC}
  1461. // 
  1462. // Description:
  1463. // This command sets the current color for all subsequent button shadows when
  1464. // using the DEFINE EVENT command with the SHADOW option.
  1465. //
  1466. // Syntax:
  1467. // SET EVENT SHADOW TO <color>
  1468. //
  1469. // Arguments:
  1470. // <color> is the color to be used for all subsequent event region shadows.
  1471. //   This argument uses standard Clipper color formats.
  1472. //    
  1473. // Example:
  1474. // SET EVENT SHADOW TO "n+/b"                // set shadow color to grey
  1475. //
  1476. //          Purpose: Establish the color of button shadows
  1477. //  Mapped Function: __SetEventShadow() contained in GLLIBR.PRG.
  1478. //    dGE functions: None.
  1479. //    Other GL UDFs: None.
  1480. // System variables: _eshadow_
  1481. // System constants: None.
  1482. //
  1483. // See Also:
  1484. // 
  1485. #command    SET EVENT SHADOW TO <color> ;        // Complete 12-24-90
  1486.                => __SetEventShadow(<"color">)
  1487.  
  1488.  
  1489. // DEFINE EVENT <label> FROM --------------------------------------------------
  1490. // TecGuide-> {Language Ref::Event Commands::UDC}
  1491. // 
  1492. // Description:
  1493. // This command creates an event region on the screen without a visible 
  1494. // button or graphical object.  It creates a "click" region that is 
  1495. // invisible.  However, the click region can be superimposed over other 
  1496. // objects such as icons, bars in a bar chart, and other graphical objects.
  1497. // Event regions are automatically created when icon buttons are defined.
  1498. //
  1499. // Syntax:
  1500. // DEFINE EVENT <label> FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b>
  1501. //    [ACTIVATE]
  1502. //
  1503. // Arguments:
  1504. // <label> is a label name assciated with a region in the event array.
  1505. //    
  1506. // Example:
  1507. // DRAW BOX FROM 21,26 TO 22,56              // display a box
  1508. // @ 21.5,28 DRAW "CLICK HERE..."            // display message in box
  1509. // DEFINE EVENT "PAUSE" ;                    // define the event area
  1510. //    FROM 21,26 TO 22,56 ;                  // specify the area
  1511. //    ACTIVATE                               // activate the region 
  1512. // WAIT EVENT "PAUSE" RELEASE                // wait for a mouse press
  1513. //
  1514. //          Purpose: Create a mouse click region
  1515. //  Mapped Function: __DefEventRegion() contained in GLLIBR.PRG.
  1516. //    dGE functions: __ScanObjects(),__FindUnusedHandle(),__HandleInRange()
  1517. //                   __ActEventRegion(),__HandleError()
  1518. //    Other GL UDFs: None.
  1519. // System variables: _handles_[]
  1520. // System constants: NoHandlesLeft
  1521. //
  1522. // See Also:
  1523. // ACTIVATE EVENT, DEACTIVATE EVENT, RELEASE EVENT
  1524. // 
  1525. #command    DEFINE EVENT <label> ;               // Incomplete
  1526.                   FROM <Pos1_a>,<Pos1_b> TO <Pos2_a>,<Pos2_b> ;
  1527.                   [<act: ACTIVATE>] ;
  1528.                => __DefEventRegion(<label>, ;
  1529.                   <Pos1_a>, ;
  1530.                   <Pos1_b>, ;
  1531.                   <Pos2_a>, ;
  1532.                   <Pos2_b>, ;
  1533.                   <.act.>)
  1534.  
  1535.  
  1536. // DEFINE EVENT <label> AT -----------------------------------------------------
  1537. // TecGuide-> {Language Ref::Event Commands::UDC}
  1538. // 
  1539. // Description:
  1540. // This command creates a super icon as a mouse click button and adds it to
  1541. // the GET list for processing with WAIT EVENT TO.  An optional ACTIVATE
  1542. // clause is used to display it immediately.  The SHADOW clause will draw a
  1543. // shadow box behing the icon.
  1544. //
  1545. // Syntax:
  1546. // DEFINE EVENT <label> AT <Pos1>,<Pos2> USING SUPER ICON <icon> ;
  1547. //   [SHADOW] [ACTIVATE]
  1548. //
  1549. // Arguments:
  1550. // <Pos1> is the center point row screen coordinate of the super icon button.
  1551. // <Pos2> is the center point column screen coordinate of the super icon
  1552. //   button.
  1553. // <label> is the button name.
  1554. // <icon> is the icon number from the current super icon file.
  1555. // <ACTIVATE> is an optional specification that activates and displays the
  1556. //   button once it's defined.
  1557. // <SHADOW> is an optional specification that draws a shadow behind the 
  1558. //   button.
  1559. //    
  1560. // Example:
  1561. // DEFINE EVENT "one" AT 03,08 ;             // define/disp icon button
  1562. //   USING SUPER ICON 2 SHADOW ACTIVATE
  1563. //
  1564. //          Purpose: Define a super icon button
  1565. //  Mapped Function: __DefIconButton() contained in GLLIBR.PRG.
  1566. //    dGE functions: None.
  1567. //    Other GL UDFs: __ScanObjects,__ActIconButton(),__HandleError()
  1568. // System variables: _eshadow_,_handles_[]
  1569. // System constants: None.
  1570. //
  1571. // See Also:
  1572. // ACTIVATE EVENT, DEACTIVATE EVENT, RELEASE EVENT
  1573. // 
  1574. #command    DEFINE EVENT <label> AT ;            // Complete 12-24-90
  1575.                   <Pos1>,<Pos2> USING SUPER ICON <icon> ;
  1576.                   [<act: ACTIVATE>] ;
  1577.                   [<sha: SHADOW>] ;
  1578.                => __DefIconButton(<label>, ;
  1579.                   <Pos1>,<Pos2>,<icon>, ;
  1580.                   if(<.act.>,ActiveObject,InactiveObject), ;
  1581.                   if(<.sha.>,ShadowOn,ShadowOff))
  1582.  
  1583.  
  1584. // ACTIVATE EVENT <label> -----------------------------------------------------
  1585. // TecGuide-> {Language Ref::Event Commands::UDC}
  1586. // 
  1587. // Description:
  1588. // This command changes the status of an event region to active.
  1589. //
  1590. // Syntax:
  1591. // ACTIVATE EVENT <label>
  1592. //
  1593. // Arguments:
  1594. // <label> is a label name assciated with a region in the event array.
  1595. //
  1596. // Example:
  1597. // ACTIVATE EVENT "pause"                    // activate event "pause"
  1598. //
  1599. //          Purpose: Activate a mouse click region
  1600. //  Mapped Function: __ActEventRegion() contained in GLLIBR.PRG.
  1601. //    dGE functions: msethot()
  1602. //    Other GL UDFs: __ScanObjects(),__XdGE(),__YdGE(),__XdGE_(),__YdGE_()
  1603. //                   __HandleError()
  1604. // System variables: _handles_[]
  1605. // System constants: NoSuchLabel
  1606. //
  1607. // See Also:
  1608. // DEFINE EVENT, DEACTIVATE EVENT, RELEASE EVENT, WAIT EVENT
  1609. //
  1610. #command    ACTIVATE EVENT <label> ;             // Complete 12-27-90
  1611.                => __ActEventRegion(<label>)
  1612.  
  1613.  
  1614. // MOVE EVENT <label> TO <Pos1>,<Pos2> ----------------------------------------
  1615. // TecGuide-> {Language Ref::Event Commands::UDC}
  1616. // 
  1617. // Description:
  1618. // This command is useful when moving an icon button from one location to 
  1619. // another.  The move will not change the status of the button unless the
  1620. // optional ACTIVATE or DEACTIVATE clauses are used.
  1621. //
  1622. // Syntax:
  1623. // MOVE EVENT <label> TO <Pos1>,<Pos2> [ACTIVATE] [DEACTIVATE]
  1624. //
  1625. // Arguments:
  1626. // <Pos1> is the new row screen coordinate of the event object.
  1627. // <Pos2> is the new column screen coordinate of the event object.
  1628. // <label> is the event object name.
  1629. // <ACTIVATE> is an optional specification that activates the event object
  1630. //   in its new location.
  1631. // <DEACTIVATE> is an optional specification that deactivates the event 
  1632. //   object in its new location.
  1633. //    
  1634. // Example:
  1635. // MOVE EVENT "button one" TO 20,20          // move event object
  1636. // 
  1637. //          Purpose: Move a previously defined event object
  1638. //  Mapped Function: __MovEventRegion() contained in GLLIBR.PRG.
  1639. //    dGE functions: msethot(),loadicon()
  1640. //    Other GL UDFs: __ScanObjects,__DrawSuperIcon(),__HandleError()
  1641. // System variables: _handles_[],_eshadow_,_icnfile_,_dgepath_
  1642. // System constants: None.
  1643. //
  1644. // See Also:
  1645. // 
  1646. #command    MOVE EVENT <label> TO ;              // Complete 12-24-90
  1647.                   <Pos1>,<Pos2> ;
  1648.                   [<act: ACTIVATE>] ;
  1649.                   [<dea: DEACTIVATE>] ;
  1650.                => __MovEventRegion(<label>, ;
  1651.                   <Pos1>, ;
  1652.                   <Pos2>, ;
  1653.                   if(<.act.>,ActiveObject,NIL), ;
  1654.                   if(<.dea.>,InactiveObject,NIL) ;
  1655.                   )
  1656.  
  1657.  
  1658. // FLASH EVENT <label> --------------------------------------------------------
  1659. // TecGuide-> {Language Ref::Event Commands::UDC}
  1660. // 
  1661. // Description:
  1662. // This command simply redraws the specified event giving it a selected
  1663. // or picked look.  Note that this command has the effect of activating the
  1664. // event region being redrawn.  Note that this command has no effect on
  1665. // event regions that lack a physical object.
  1666. //
  1667. // Syntax:
  1668. // FLASH EVENT <label>
  1669. //
  1670. // Arguments:
  1671. // <label> is a label name assciated with a region in the event array.
  1672. //    
  1673. // Example:
  1674. // FLASH EVENT "button one"                  // flash the button
  1675. //
  1676. //          Purpose: Redraw a button
  1677. //  Mapped Function: __FlaEventRegion() contained in GLLIBR.PRG.
  1678. //    dGE functions: None.
  1679. //    Other GL UDFs: __ScanObjects,__ActIconButton(),__ClrIconButton()
  1680. //                   __HandleError()
  1681. // System variables: _handles_[]
  1682. // System constants: None.
  1683. //
  1684. // See Also:
  1685. // 
  1686. #command    FLASH EVENT <label>;                 // Completed 12-24-90
  1687.                => __FlaEventRegion(<label>)
  1688.  
  1689.  
  1690. // DEACTIVATE EVENT <label> ---------------------------------------------------
  1691. // TecGuide-> {Language Ref::Event Commands::UDC}
  1692. // 
  1693. // Description:
  1694. // This command changes the status of an event object to inactive and 
  1695. // optionally clears the screen of the object.
  1696. //
  1697. // Syntax:
  1698. // DEACTIVATE EVENT <label> [CLEAR]
  1699. //
  1700. // Arguments:
  1701. // <label> is a label name assciated with a region in the event array.
  1702. //
  1703. // Example:
  1704. // DEACTIVATE EVENT "pause"                  // suspend event "pause"
  1705. //
  1706. //          Purpose: Deactivate a mouse click region
  1707. //  Mapped Function: __DeaEventRegion() contained in GLLIBR.PRG.
  1708. //    dGE functions: msethot()
  1709. //    Other GL UDFs: __ScanObjects(),__RelEventRegion(),__HandleError()
  1710. // System variables: _handles_[]
  1711. // System constants: NoSuchLabel
  1712. //
  1713. // See Also:
  1714. // DEFINE EVENT, ACTIVATE EVENT, RELEASE EVENT, WAIT EVENT
  1715. //
  1716. #command    DEACTIVATE EVENT <label> ;           // Complete 12-27-90
  1717.                   [<clr: CLEAR>] ;               // clear a physical object
  1718.                => __DeaEventRegion(<label>,<.clr.>)
  1719.  
  1720.  
  1721. // RELEASE EVENT <label> ------------------------------------------------------
  1722. // TecGuide-> {Language Ref::Event Commands::UDC}
  1723. // 
  1724. // Description:
  1725. // This command eliminates the specified label from the event array, freeing
  1726. // the space it occupied in the array.
  1727. //
  1728. // Syntax:
  1729. // RELEASE EVENT <label>
  1730. //
  1731. // Arguments:
  1732. // <label> is a label name assciated with a region in the event array.
  1733. //    
  1734. // Example:
  1735. // RELEASE EVENT "pause"                     // kill the "pause" region
  1736. //
  1737. //          Purpose: Kill an event region
  1738. //  Mapped Function: __RelEventRegion() contained in GLLIBR.PRG.
  1739. //    dGE functions: msethot()
  1740. //    Other GL UDFs: __ScanObjects(),__HandleError()
  1741. // System variables: _handles_[]
  1742. // System constants: NoSuchLabel
  1743. //
  1744. // See Also:
  1745. // DEFINE EVENT, ACTIVATE EVENT, DEACTIVATE EVENT, WAIT EVENT
  1746. // 
  1747. #command    RELEASE EVENT <label> ;              // Complete 12-27-90
  1748.                => __RelEventRegion(<label>)
  1749.  
  1750.  
  1751. // WAIT EVENT <label> --------------------------------------------------------
  1752. // TecGuide-> {Language Ref::Event Commands::UDC}
  1753. // 
  1754. // Description:
  1755. // This command processes a mouse event and deterimines if a click has 
  1756. // occured in the region specified for the region label.  If the click is
  1757. // not in that region, nothing happens.  If a click does occur in the 
  1758. // active and specified region, the program continues.  See the Technical 
  1759. // Reference section for more details about the button GET list array.
  1760. //
  1761. // Syntax:
  1762. // WAIT EVENT <label> [RELEASE]
  1763. //
  1764. // Arguments:
  1765. // <label> is an object name assciated with a region to prompt for.
  1766. //    
  1767. // Example:
  1768. // DRAW BOX FROM 21,26 TO 22,56              // display a box
  1769. // @ 21.5,28 DRAW "CLICK HERE..."            // display message in box
  1770. // DEFINE EVENT "PAUSE" ;                    // define the event area
  1771. //    FROM 21,26 TO 22,56 ;                  // specify the area
  1772. //    ACTIVATE                               // activate the region 
  1773. // WAIT EVENT "PAUSE" RELEASE                // wait for a mouse press
  1774. //
  1775. //          Purpose: Wait for a mouse click in a specific region
  1776. //  Mapped Function: __WaitForClick() contained in GLLIBR.PRG.
  1777. //    dGE functions: mstatus(),mgethot()
  1778. //    Other GL UDFs: __ScanObjects(),__DeaEventRegion(),__RelEventRegion()
  1779. // System variables: _handles_[]
  1780. // System constants: 
  1781. //
  1782. // See Also:
  1783. // DEFINE EVENT, ACTIVATE EVENT, DEACTIVATE EVENT, RELEASE EVENT
  1784. // 
  1785. #command    WAIT EVENT <label> ;                 // Incomplete
  1786.                   [<dea: DEACTIVATE>] ;
  1787.                   [<rel: RELEASE>] ;             // release the array
  1788.                   [<nof: NOFLASH>] ;
  1789.                => __WaitForClick(<label>, ;
  1790.                   <.dea.>, ;
  1791.                   <.rel.>, ;
  1792.                   <.nof.> ;
  1793.                   )
  1794.  
  1795.  
  1796. // WAIT EVENT TO -------------------------------------------------------------
  1797. // TecGuide-> {Language Ref::Event Commands::UDC}
  1798. // 
  1799. // Description:
  1800. // This command waits for a mouse click in any of the currently active GET
  1801. // regions and returns the event label into the specified memory variable.
  1802. // NOFLASH is an optional command that suppresses the flashing or redrawing
  1803. // of the button that was clicked.  See the Technical Reference section for
  1804. // more details about the event region GET list array.
  1805. //
  1806. // Syntax:
  1807. // WAIT EVENT TO <memvar>
  1808. // 
  1809. // Arguments:
  1810. // <memvar> is a memory variable to store the region clicked by the mouse.
  1811. // [NOFLASH] is an optional command that suppresses the redrawing of the
  1812. //   button object.
  1813. //    
  1814. // Example:
  1815. // DEFINE EVENT "1" AT 03,08 USING SUPER ICON 2 SHADOW ACTIVATE
  1816. // DEFINE EVENT "2" AT 09,08 USING SUPER ICON 4 SHADOW ACTIVATE
  1817. // DEFINE EVENT "3" AT 15,08 USING SUPER ICON 6 SHADOW ACTIVATE
  1818. // DEFINE EVENT "4" AT 21,08 USING SUPER ICON 7 SHADOW ACTIVATE
  1819. // DEFINE EVENT "5" AT 21,70 USING SUPER ICON 1 SHADOW ACTIVATE
  1820. // WAIT EVENT TO CHOICE_                     // wait for a mouse press
  1821. //
  1822. //          Purpose: Wait for a mouse click, return the event label
  1823. //  Mapped Function: __WaitForEvent() contained in GLLIBR.PRG.
  1824. //    dGE functions: mstatus(),mgethot()
  1825. //    Other GL UDFs: __FindObject(),__FlaEventRegion()
  1826. // System variables: _handles_[]
  1827. // System constants: None.
  1828. //
  1829. // See Also:
  1830. // DEFINE EVENT, ACTIVATE EVENT, DEACTIVATE EVENT, RELEASE EVENT
  1831. // 
  1832. #command    WAIT EVENT TO ;                      // Incomplete
  1833.                   <memvar> ;
  1834.                   [<nof: NOFLASH>] ;
  1835.                => <memvar> := __WaitForEvent(<.nof.>)
  1836.  
  1837.  
  1838. // DRAW BAR CHART AT ---------------------------------------------------------
  1839. // TecGuide-> {Language Ref::Business Commands::UDC}
  1840. // 
  1841. // Description:
  1842. // This command displays a bar chart at the specified row/column coordinates.  
  1843. // The chart is based on a database file that can be optionally filtered. 
  1844. // For alternating bar patterns and colors, enter the PATTERN and COLOR
  1845. // options respectively. 
  1846. //
  1847. // Syntax:
  1848. // DRAW BAR CHART AT <Pos1>,<Pos2> USING <dbf> PLOT <field> 
  1849. //    [LABEL <field>]
  1850. //    [WIDTH <width>]
  1851. //    [HEIGHT <height>]
  1852. //    [DIVISION <value>]
  1853. //    [FILTER <filter>]
  1854. //    [SOLID]
  1855. //    [DOTTED]
  1856. //    [DASHED]
  1857. //    [BOX]
  1858. //    [PATTERN] 
  1859. //    [COLOR <color>] 
  1860. //    [3D] 
  1861. //    [HORIZONTAL] 
  1862. //
  1863. // Arguments:
  1864. // <Pos1> is the row screen coordinate for the lower left corner of the 
  1865. //   chart.
  1866. // <Pos2> is the column screen coordinate for the lower left corner of the 
  1867. //   chart.
  1868. // <dbf> is the database file to be used as the source of data.
  1869. // [PLOT <field>] is the field to plot.
  1870. // [LABEL <field>] is the field to display on the X axes.
  1871. // [WIDTH <width>] is the width of the chart.  The default is established as
  1872. //   a preprocessor constant in GLLIBR.CH with a value of ???.
  1873. // [HEIGHT <height>] is the height of the chart.  The default is established 
  1874. //   as a preprocessor constant in GLLIBR.CH with a value of ???.
  1875. // [DIVISION <value>] is the Y axes value for determining where labels and
  1876. //   grid lines will be placed.
  1877. // [SOLID] invokes solid Y axes grid lines at the division marks.
  1878. // [DOTTED] invokes dotted Y axes grid lines at the division marks.
  1879. // [DASHED] invokes dashed Y axes grid lines at the division marks.
  1880. // [BOX] draws a box around the chart area.
  1881. // <filter> is the filter statement that isolates the data for the chart.
  1882. // [PATTERN] alternates bar patterns.
  1883. // [COLOR <color>]  establishes the bar colors.
  1884. // [3D] displays the bars in three dimensional mode.
  1885. // [HORIZONTAL] displays the bars in horizontal format.
  1886. //    
  1887. // Example:
  1888. // DRAW BAR CHART AT 14,23 USING SAMPLE.DBF; // display a bar chart
  1889. //    PLOT DIV_INCOME/100 ;                  // select the field to plot
  1890. //    LABLE DIVISION                         // select field for X axes
  1891. //    FILTER RECNO()<=16 ;                   // set the filter
  1892. //    COLOR BLUE;                            // display blue color bars
  1893. //    3D ;                                   // display in 3d mode
  1894. //    HEIGHT 8 ;                             // height of 8 rows
  1895. //    WIDTH 40 ;                             // width of 40 chrs
  1896. //    DIVISION 5000 ;                        // Y axes divisions
  1897. //    DOTTED ;                               // dotted Y grid lines
  1898. //    BOX                                    // box the chart
  1899. //
  1900. //          Purpose: Display a bar chart
  1901. //  Mapped Function: __DrawBarChart() contained in GLLIBR.PRG.
  1902. //    dGE functions: datastore(),bargraph(),datareset()
  1903. //    Other GL UDFs: None.
  1904. // System variables: None.
  1905. // System constants: None.
  1906. //
  1907. // See Also:
  1908. // 
  1909. #command    DRAW BAR CHART AT ;                  // Incomplete
  1910.                   <Pos1>,<Pos2> ;
  1911.                   USING <dbf> ;
  1912.                   PLOT <field> ;
  1913.                   [LABEL <label>] ;
  1914.                   [WIDTH <width>] ;
  1915.                   [HEIGHT <height>] ;
  1916.                   [DIVISION <division>] ;
  1917.                   [FILTER <filter>] ;
  1918.                   [<sol: SOLID>] ;
  1919.                   [<dot: DOTTED>] ;
  1920.                   [<das: DASHED>] ;
  1921.                   [<box: BOX>] ;
  1922.                   [<pat: PATTERN>] ;
  1923.                   [COLOR <*color*>] ;
  1924.                   [COLOUR <*color*>] ;
  1925.                   [<thr: 3D>] ;
  1926.                   [<hor: HORIZONTAL>] ;
  1927.                => __DrawBarChart(<Pos1>,<Pos2>, ;
  1928.                   <"dbf">, ;
  1929.                   <"field">, ;
  1930.                   <"label">, ;
  1931.                   <width>, ;
  1932.                   <height>, ;
  1933.                   <division>, ;
  1934.                   #<filter>,;
  1935.                   if(<.sol.>,4,0), ;
  1936.                   if(<.dot.>,8,0), ;
  1937.                   if(<.das.>,12,0), ;
  1938.                   if(<.box.>,64,0), ;
  1939.                   <.pat.>, ;
  1940.                   #<color>, ;
  1941.                   if(<.thr.>,16,0), ;
  1942.                   if(<.hor.>,4,0) ;
  1943.                   )
  1944.  
  1945.  
  1946. // DRAW XY CHART AT -----------------------------------------------------------
  1947. // TecGuide-> {Language Ref::Business Commands::UDC}
  1948. // 
  1949. // Description:
  1950. // This command displays an XY chart at the specified row/column coordinates.  
  1951. // The chart is based on a database file that can be optionally filtered. 
  1952. //
  1953. // Syntax:
  1954. // DRAW XY CHART AT <Pos1>,<Pos2> USING <dbf> PLOT <field> 
  1955. //    [LABEL <field>]
  1956. //    [WIDTH <width>]
  1957. //    [HEIGHT <height>]
  1958. //    [DIVISION <value>]
  1959. //    [FILTER <filter>]
  1960. //    [SOLID]
  1961. //    [DOTTED]
  1962. //    [DASHED]
  1963. //    [BOX]
  1964. //
  1965. // Arguments:
  1966. // <Pos1> is the row screen coordinate for the lower left corner of the 
  1967. //   chart.
  1968. // <Pos2> is the column screen coordinate for the lower left corner of the 
  1969. //   chart.
  1970. // <dbf> is the database file to be used as the source of data.
  1971. // [PLOT <field>] is the field to plot.
  1972. // [LABEL <field>] is the field to display on the X axes labels.
  1973. // [WIDTH <width>] is the width of the chart.  The default is established as
  1974. //   a preprocessor constant in GLLIBR.CH with a value of ???.
  1975. // [HEIGHT <height>] is the height of the chart.  The default is established 
  1976. //   as a preprocessor constant in GLLIBR.CH with a value of ???.
  1977. // [DIVISION <value>] is the Y axes value for determining where labels and
  1978. //   grid lines will be placed.
  1979. // [SOLID] invokes solid Y axes grid lines at the division marks.
  1980. // [DOTTED] invokes dotted Y axes grid lines at the division marks.
  1981. // [DASHED] invokes dashed Y axes grid lines at the division marks.
  1982. // [BOX] draws a box around the chart area.
  1983. // <filter> is the filter statement that isolates the data for the chart.
  1984. //    
  1985. // Example:
  1986. // DRAW XY CHART AT 14,23 USING SAMPLE.DBF;  // display an xy chart
  1987. //    PLOT DIV_INCOME/100 ;                  // select the field to plot
  1988. //    LABLE DIVISION                         // select field for X axes
  1989. //    FILTER RECNO()<=16 ;                   // set the filter
  1990. //    HEIGHT 8 ;                             // height of 8 rows
  1991. //    WIDTH 40 ;                             // width of 40 chrs
  1992. //    DIVISION 5000 ;                        // Y axes divisions
  1993. //    DOTTED ;                               // dotted Y grid lines
  1994. //    BOX                                    // box the chart
  1995. //
  1996. //          Purpose: Display an XY chart
  1997. //  Mapped Function: __DrawXYChart() contained in GLLIBR.PRG.
  1998. //    dGE functions: datastore(),xygraph(),datareset()
  1999. //    Other GL UDFs: None.
  2000. // System variables: None.
  2001. // System constants: None.
  2002. //
  2003. // See Also:
  2004. // 
  2005. #command    DRAW XY CHART AT ;                   // Complete 12-9-90
  2006.                   <Pos1>,<Pos2> ;
  2007.                   USING <dbf> ;
  2008.                   PLOT <field> ;
  2009.                   [LABEL <label>] ;
  2010.                   [WIDTH <width>] ;
  2011.                   [HEIGHT <height>] ;
  2012.                   [DIVISION <division>] ;
  2013.                   [FILTER <filter>] ;
  2014.                   [<sol: SOLID>] ;
  2015.                   [<dot: DOTTED>] ;
  2016.                   [<das: DASHED>] ;
  2017.                   [<box: BOX>] ;
  2018.                   [<col: COLOR,COLOUR>] ;
  2019.                => __DrawXYChart(<Pos1>,<Pos2>, ;
  2020.                   <"dbf">, ;
  2021.                   <"field">, ;
  2022.                   <"label">, ;
  2023.                   <width>, ;
  2024.                   <height>, ;
  2025.                   <division>, ;
  2026.                   <"filter">,;
  2027.                   if(<.sol.>,4,0), ;
  2028.                   if(<.dot.>,8,0), ;
  2029.                   if(<.das.>,12,0), ;
  2030.                   if(<.box.>,64,0), ;
  2031.                   <.col.> ;
  2032.                   )
  2033.  
  2034.  
  2035. // DRAW PIE CHART AT ---------------------------------------------------------
  2036. // TecGuide-> {Language Ref::Business Commands::UDC}
  2037. // 
  2038. // Description:
  2039. // This command displays a pie chart centered at the specified row/column
  2040. // location.  Restrictions placed on dGE such as the datastore() values must
  2041. // be in the range 0 to 32768 apply equally to Graphics Library commands.
  2042. //
  2043. // Syntax:
  2044. // DRAW PIE CHART AT <Pos1>,<Pos2> USING <dbf> PLOT <field> 
  2045. //    [FILTER <filter>] 
  2046. //    [PATTERN] 
  2047. //    [COLOR] 
  2048. //    [LABEL <label>] 
  2049. //    [OFFSET <value>]
  2050. //    [EXPLODE <slice>] 
  2051. //    [RADIUS <radius>] 
  2052. //    [PERCENT] 
  2053. //    [NOCONNECT] 
  2054. //
  2055. // Arguments:
  2056. // <Pos1> is the row screen coordinate of the center of the pie.
  2057. // <Pos2> is the column screen coordinate of the center of the pie.
  2058. // <dbf> is the database file that contains the data to be charted.
  2059. // <field> is the field to be charted.
  2060. // <filter> is a filter statement that isolates the records to be charted.
  2061. // [PATTERN] alternates the fill patterns for the pie slices.
  2062. // [COLOR] alternates the color for the pie slices.
  2063. // <label> is a field denoting the pie slice labels.
  2064. // [OFFSET <value>] is the pie chart label offset.  This value must be 
  2065. //   expressed in Cartesian values.  The default offset is 50 and is defined
  2066. //   as a preprocessor constant in GLLIBR.CH.
  2067. // <slice> is a slice number to be exploded from the rest of the pie.
  2068. // <radius> is the width in characters from the center point to the outer 
  2069. //   rim of the pie.
  2070. // [PERCENT] displays percentage values of each pie slice.
  2071. // [NOCONNECT] suppresses the radius connecting lines.
  2072. //    
  2073. // Example:
  2074. // DRAW PIE CHART AT 08.5,46 ;               // draw a pie chart
  2075. //    USING SAMPLE.DBF ;                     // select the database
  2076. //    PLOT DIV_INCOME ;                      // select the field to plot
  2077. //    LABEL DIVISION ;                       // select the lable
  2078. //    PATTERN ;                              // select alternatine patterns
  2079. //    RADIUS 12 ;                            // select the radius (in chrs)
  2080. //    EXPLODE 3 ;                            // select the slice to explode
  2081. //    FILTER YEAR="1990" ;                   // only plot 1990 data
  2082. //    COLOR                                  // select alternating colors
  2083. //
  2084. //          Purpose: Display pie chart
  2085. //  Mapped Function: __DrawPieChart() contained in GLLIBR.PRG.
  2086. //    dGE functions: datastore(),piechart(),datareset()
  2087. //    Other GL UDFs: None.
  2088. // System variables: None.
  2089. // System constants: None.
  2090. //
  2091. // See Also:
  2092. // 
  2093. #command    DRAW PIE CHART AT ;                  // Complete 12-29-90
  2094.                   <Pos1>,<Pos2> ;
  2095.                   USING <dbf> ;
  2096.                   PLOT <field> ;
  2097.                   [FILTER <filter>] ;
  2098.                   [<pat: PATTERN>] ;
  2099.                   [<col: COLOR,COLOUR>] ;
  2100.                   [LABEL <label>] ;
  2101.                   [OFFSET <offset>] ;
  2102.                   [EXPLODE <slice>] ;
  2103.                   [RADIUS <radius>] ;
  2104.                   [<per: PERCENT>] ;
  2105.                   [<noc: NOCONNECT>] ;
  2106.                => __DrawPieChart(<Pos1>,<Pos2>, ;
  2107.                   <"dbf">, ;
  2108.                   <"field">, ;
  2109.                   <"filter">, ;
  2110.                   <.pat.>, ;
  2111.                   <.col.>, ;
  2112.                   <"label">, ;
  2113.                   <offset>, ;
  2114.                   <slice>, ;
  2115.                   <radius>, ;
  2116.                   if(<.per.>,4,0),;
  2117.                   if(<.noc.>,8,0);
  2118.                   )
  2119.  
  2120. 
  2121.